aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/invoice/[id]
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(app)/invoice/[id]')
-rw-r--r--src/routes/(app)/invoice/[id]/+layout.server.ts7
-rw-r--r--src/routes/(app)/invoice/[id]/+page.svelte4
2 files changed, 5 insertions, 6 deletions
diff --git a/src/routes/(app)/invoice/[id]/+layout.server.ts b/src/routes/(app)/invoice/[id]/+layout.server.ts
index e7144b15..71f53e09 100644
--- a/src/routes/(app)/invoice/[id]/+layout.server.ts
+++ b/src/routes/(app)/invoice/[id]/+layout.server.ts
@@ -1,4 +1,4 @@
-import Qr from "qrcode-base64";
+import * as Qr from "qrcode-base64";
import { get } from "$lib/utils";
import { redirect } from "@sveltejs/kit";
@@ -26,11 +26,10 @@ export async function load({ depends, params, url, parent }) {
(!amount && (pending || received)) ||
(amount > 0 && (pending >= amount || received >= amount));
if (paid && !url.pathname.endsWith("paid")) {
- redirect( 307, `/invoice/${id}/paid` + (options ? "?options=true" : "")
- );
+ redirect(307, `/invoice/${id}/paid` + (options ? "?options=true" : ""));
}
- let src = Qr.drawImg(invoice.text || "", { size: 340 });
+ let src = Qr.drawImg(invoice.text || "", { size: 500 });
return { id, invoice, subject, src };
}
diff --git a/src/routes/(app)/invoice/[id]/+page.svelte b/src/routes/(app)/invoice/[id]/+page.svelte
index c4810889..36f5d261 100644
--- a/src/routes/(app)/invoice/[id]/+page.svelte
+++ b/src/routes/(app)/invoice/[id]/+page.svelte
@@ -136,14 +136,14 @@
>
<img
{src}
- class="mx-auto z-10 shadow-inner rounded-2xl"
+ class="mx-auto z-10 rounded-2xl w-[260px] rounded-2xl"
bind:this={qr}
alt={txt}
/>
</a>
</div>
{:else}
- <div class="break-all pb-5 text-lg text-center">
+ <div class="break-all pb-5 text-center text-secondary">
{txt}
</div>
{/if}